import { defHttp } from '/@/utils/http/axios';
import { DeptParams, DeptResultModel } from './model/deptModel';

import { ErrorMessageMode } from '/#/axios';

enum Api {
  Dept = '/Dept/api/',
}

/**
 * @description: user login api
 */
export function DeptApi(params: DeptParams, mode: ErrorMessageMode = 'modal') {
  return defHttp.get<DeptResultModel>(
    {
      url: Api.Dept,
      params,
    },
    {
      errorMessageMode: mode,
    },
  );
}
